// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   JivePropertyOverrideConfigurer.java

package org.jawa.spring;

import java.util.*;

import org.jawa.Constants;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

public class JawaPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer {

	private Map propertyMappings;

	public JawaPropertyPlaceholderConfigurer() {
		propertyMappings = new HashMap();
	}

	public void setPropertyMappings(Map propertyMappings) {
		this.propertyMappings = propertyMappings;
	}

	public void init() {
		Properties props = new Properties();
		for (Iterator iter = propertyMappings.keySet().iterator(); iter
				.hasNext();) {
			String propName = (String) iter.next();
			try {
				props.put(propName, Constants
						.getXMLProperty(propName));
			} catch (Exception e) {
//				Log.debug(String.format("Couldn't load JiveProperty, %s: %s",
//						new Object[] { jivePropName, e.getMessage() }));
			}
		}

		setProperties(props);
	}
}
